@echo off
echo ========================================
echo 启动人脸识别后端服务
echo ========================================

echo 检查Java环境...
java -version
if %errorlevel% neq 0 (
    echo 错误: 未找到Java环境，请先安装JDK
    pause
    exit /b 1
)

echo.
echo 检查Maven环境...
mvn -version
if %errorlevel% neq 0 (
    echo 错误: 未找到Maven环境，请先安装Maven
    pause
    exit /b 1
)

echo.
echo 编译项目...
mvn clean compile
if %errorlevel% neq 0 (
    echo 错误: 项目编译失败
    pause
    exit /b 1
)

echo.
echo 启动Spring Boot应用...
echo 服务将在 http://123.56.17.253:1001 启动
echo 人脸识别接口: http://123.56.17.253:1001/face/recognize
echo 阈值信息接口: http://123.56.17.253:1001/face/threshold-info
echo.
echo 按 Ctrl+C 停止服务
echo ========================================

mvn spring-boot:run

pause



